package 开闭原则;

public class OpenCloseTest {
    public static void main(String[] args) {
        // 创建对象 获取优惠价格
        JavaDiscountCourse java = new JavaDiscountCourse(1, "java", 25.00);
        System.out.println("课程原价=" + java.getOriginPrice());
        System.out.println("优惠后课程价格=" + java.getPrice());
        System.out.println("课程名称=" + java.getName());
        System.out.println("课程id=" + java.getId());
        System.out.println("————————————————————————————————————————");

        PythonDiscountCourse python = new PythonDiscountCourse(2, "python", 45.00);
        System.out.println("课程原价=" + python.getOriginPrice());
        System.out.println("优惠后课程价格=" + python.getPrice());
        System.out.println("课程名称=" + python.getName());
        System.out.println("课程id=" + python.getId());
        System.out.println("————————————————————————————————————————");
    }
}
